package api.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;

@TableMeta(name="ot_api_collect",description="汇总")
public class ApiCollect extends Model {
    @FieldMeta(name="description",type=FieldType.STRING,length=200,description="描述")
    private String description;
    @FieldMeta(name="source",type=FieldType.STRING,length=10,description="来源",dictOption = "table:数据模型,collect:汇总模型")
    private String source;
    @LinkTableMeta(name="table_oid",table= ApiTable.class,description="开始查询表")
    private ApiTable table;
    @LinkTableMeta(name="collect_oid",table= ApiCollect.class,description="开始汇总表")
    private ApiCollect collect;
    @FieldMeta(name="alias",type= FieldType.STRING,length=20,description="表别名")
    private String alias;
    @FieldMeta(name="title",type= FieldType.STRING,length=50,description="标题")
    private String title;
    @FieldMeta(name="sub_title",type=FieldType.STRING,length=50,description="子标题")
    private String subTitle;
    @FieldMeta(name="show_index_col",type=FieldType.STRING, description="序号列",dictOption = "Y:显示,N:不显示")
    private String showIndexColumn;
    @FieldMeta(name="scol",type=FieldType.INT,description="合并开始列")
    private Integer scol;			//单元格合并开始列
    @FieldMeta(name="slength",type=FieldType.INT,description="合并列长度")
    private Integer slength;		//单元格合并长度.
    @FieldMeta(name="sql_condition",type=FieldType.STRING,length=200,description="条件")
    private String sqlCondition;
    @FieldMeta(name="sql_order",type=FieldType.STRING,length=200,description="排序")
    private String sqlOrder;
    @FieldMeta(name="sql_having",type=FieldType.STRING,length=200,description="聚合条件")
    private String sqlHaving;
    @FieldMeta(name="functions",type=FieldType.STRING,length=100,description="功能",dictOption = "excel:导出,chart:图表")
    private String[] functions;

    public String[] getFunctions() {
        return functions;
    }

    public void setFunctions(String[] functions) {
        this.functions = functions;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public ApiCollect getCollect() {
        return collect;
    }

    public void setCollect(ApiCollect collect) {
        this.collect = collect;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getSqlCondition() {
        return sqlCondition;
    }

    public void setSqlCondition(String sqlCondition) {
        this.sqlCondition = sqlCondition;
    }

    public String getSqlOrder() {
        return sqlOrder;
    }

    public void setSqlOrder(String sqlOrder) {
        this.sqlOrder = sqlOrder;
    }

    public String getSqlHaving() {
        return sqlHaving;
    }

    public void setSqlHaving(String sqlHaving) {
        this.sqlHaving = sqlHaving;
    }

    public String getShowIndexColumn() {
        return showIndexColumn;
    }

    public void setShowIndexColumn(String showIndexColumn) {
        this.showIndexColumn = showIndexColumn;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public ApiTable getTable() {
        return table;
    }

    public void setTable(ApiTable table) {
        this.table = table;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public Integer getScol() {
        return scol;
    }

    public void setScol(Integer scol) {
        this.scol = scol;
    }

    public Integer getSlength() {
        return slength;
    }

    public void setSlength(Integer slength) {
        this.slength = slength;
    }
}
